/**
 * crawler-base
 *
 * outlook@China software studio
 * Copyright (c) 2008-2010. All Rights Reserved.
 * http://www.outlook.com
 */

package org.outlook.crawler.client.pojo;

import java.io.Serializable;

/**
 * function:
 * @author Watson email: watson.wu@hotmail.com
 * @date 2011
 */
public class Response implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private Object obj;
	
	private Status status;

	public Response(Object obj, Status status) {
		super();
		this.obj = obj;
		this.status = status;
	}
	
	public static Response newErrorInstance() {
		return new Response(null, Status.ERROR);
	}
	
	public static Response newInvalidInstance() {
		return new Response(null, Status.INVALID);
	}
	
	public static Response newMissInstance() {
		return new Response(null, Status.MISS);
	}
	
	public static Response newPendInstance() {
		return new Response(null, Status.PEND);
	}

	public Object getObj() {
		return obj;
	}

	public void setObj(Object obj) {
		this.obj = obj;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

}
